<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
function createRequestObject(){

	var req;

	if(window.XMLHttpRequest){
	//For Firefox, Safari, Opera
	req = new XMLHttpRequest();
	}
	else if(window.ActiveXObject){
	//For IE 5+
	req = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else{
	//Error for an old browser
	alert("Your browser is not IE 5 or higher, or Firefox or Safari or Opera");
	}

	return req;
	}

	//Make the XMLHttpRequest Object
	var http = createRequestObject();

	function sendRequest(method, url){
	if(method == 'get' || method == 'GET'){
	http.open(method,url);
	http.onreadystatechange = handleResponse;
	http.send(null);
	}
	}

	function handleResponse(){
	if(http.readyState == 4 && http.status == 200){
	var response = http.responseText;
	if(response){
	document.getElementById("ajax_res").innerHTML = response;
	
	}
	}      
	}
</script>
<style type="text/css">

#loginPanel
{

  border-width:3px;
  border-style:solid;
  border-color:#6699CC;
  border-radius:2px;
  width: 50%;
  height:20%; 
}

h1
{
   color:#6699CC;
   font-family:Arial;
   font-style:italic;
}
</style>

<title>Insert title here</title>
</head>
<body>
<h1>Minerva Wiki</h1>
<div id="loginPanel">
<form id="loginForm">
<label>Please Login to access files:</label>
<br/>
<input type="text" name="userName" id="userName" size="20">
<br/>
<input type="text" name = "passWord" id="passWord">
<br/>
<input type="submit" value=Login>
</form>
</div>
<!-- 
<input type="button" onclick="sendRequest('GET','http://localhost:8080/databaseTest/index.jsp')">Server Date Time:
<div id="ajax_res">Server Date Time will replace this text.</div>
 -->
</body>
</html>